﻿namespace HRM.CORE.Process
{
    using DevExpress.XtraBars;
    using APP.HELPER;
    using Common.Class;
    using APP.HELPER.Utils.Language;
    using Security.Security;
    using Dictionary.ERP;
    using HRM.CORE;
    using System;
    using Extra.ERP;
    using System.ComponentModel;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;
    using Common;
    using Extra.ERP;
    using Common;

    public class xfmAccident : Form
    {
        private bool _search;
        private IContainer components;
        private xucAccident ucList;

        public event ItemSelectedEventHander ItemSelected;

        public xfmAccident()
        {
            this.components = null;
            this._search = false;
            this.InitializeComponent();
            this.Init();
        }

        public xfmAccident(bool search)
        {
            this.components = null;
            this._search = false;
            this._search = search;
            this.InitializeComponent();
            this.Init();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Init()
        {
            SYS_LOG.Insert("Qu\x00e1 Tr\x00ecnh Tạm Ứng", "Xem");
            this.ucList.CloseClick += new ButtonClickEventHander(this.ucList_CloseClick);
            this.Text = (SysOption.Language == "EN") ? "Accident" : this.Text;
        }

        private void InitializeComponent()
        {
            Common.MenuButton menuButton1 = new Common.MenuButton();
            Common.ItemCommand itemCommand1 = new Common.ItemCommand();
            Common.ItemCommand itemCommand2 = new Common.ItemCommand();
            Common.ItemCommand itemCommand3 = new Common.ItemCommand();
            Common.ItemCommand itemCommand4 = new Common.ItemCommand();
            Common.ItemCommand itemCommand5 = new Common.ItemCommand();
            Common.ItemCommand itemCommand6 = new Common.ItemCommand();
            Common.ItemCommand itemCommand7 = new Common.ItemCommand();
            Common.ItemCommand itemCommand8 = new Common.ItemCommand();
            Common.ItemCommand itemCommand9 = new Common.ItemCommand();
            Common.ItemCommand itemCommand10 = new Common.ItemCommand();
            Common.ItemCommand itemCommand11 = new Common.ItemCommand();
            Common.ItemCommand itemCommand12 = new Common.ItemCommand();
            Common.ItemCommand itemCommand13 = new Common.ItemCommand();
            Common.ItemCommand itemCommand14 = new Common.ItemCommand();
            Common.ItemCommand itemCommand15 = new Common.ItemCommand();
            Common.ItemCommand itemCommand16 = new Common.ItemCommand();
            Common.ItemCommand itemCommand17 = new Common.ItemCommand();
            Common.ItemCommand itemCommand18 = new Common.ItemCommand();
            Common.ItemCommand itemCommand19 = new Common.ItemCommand();
            Common.ItemCommand itemCommand20 = new Common.ItemCommand();
            Common.ItemCommand itemCommand21 = new Common.ItemCommand();
            Common.ItemCommand itemCommand22 = new Common.ItemCommand();
            Common.ItemCommand itemCommand23 = new Common.ItemCommand();
            Common.ItemCommand itemCommand24 = new Common.ItemCommand();
            Common.ItemCommand itemCommand25 = new Common.ItemCommand();
            Common.ItemCommand itemCommand26 = new Common.ItemCommand();
            Common.ItemCommand itemCommand27 = new Common.ItemCommand();
            Common.ItemCommand itemCommand28 = new Common.ItemCommand();
            Common.ItemCommand itemCommand29 = new Common.ItemCommand();
            this.ucList = new HRM.CORE.Process.xucAccident();
            this.SuspendLayout();
            // 
            // ucList
            // 
            this.ucList.Dock = System.Windows.Forms.DockStyle.Fill;
            this.ucList.IsClose = Common.Class.CloseOrNew.None;
            this.ucList.IsSearch = false;
            this.ucList.Location = new System.Drawing.Point(0, 0);
            this.ucList.Name = "ucList";
            this.ucList.NotSave = false;
            itemCommand1.Caption = "";
            itemCommand1.Enable = false;
            itemCommand1.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Add = itemCommand1;
            itemCommand2.Caption = "";
            itemCommand2.Enable = false;
            itemCommand2.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Cancel = itemCommand2;
            itemCommand3.Caption = "";
            itemCommand3.Enable = false;
            itemCommand3.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Change = itemCommand3;
            itemCommand4.Caption = "";
            itemCommand4.Enable = false;
            itemCommand4.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Close = itemCommand4;
            itemCommand5.Caption = "";
            itemCommand5.Enable = false;
            itemCommand5.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Custom = itemCommand5;
            itemCommand6.Caption = "";
            itemCommand6.Enable = false;
            itemCommand6.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Delete = itemCommand6;
            itemCommand7.Caption = "";
            itemCommand7.Enable = false;
            itemCommand7.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Export = itemCommand7;
            itemCommand8.Caption = "";
            itemCommand8.Enable = false;
            itemCommand8.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Filter = itemCommand8;
            itemCommand9.Caption = "";
            itemCommand9.Enable = false;
            itemCommand9.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.FilterCustomer = itemCommand9;
            itemCommand10.Caption = "";
            itemCommand10.Enable = false;
            itemCommand10.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.FilterStock = itemCommand10;
            itemCommand11.Caption = "";
            itemCommand11.Enable = false;
            itemCommand11.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Find = itemCommand11;
            menuButton1.GClose = false;
            menuButton1.GCommand = false;
            menuButton1.GExport = false;
            itemCommand12.Caption = "";
            itemCommand12.Enable = false;
            itemCommand12.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Go = itemCommand12;
            menuButton1.GOption = false;
            menuButton1.GPrint = false;
            menuButton1.GRecords = false;
            menuButton1.GSearchBar = false;
            menuButton1.GSettings = false;
            menuButton1.GVaildation = false;
            itemCommand13.Caption = "";
            itemCommand13.Enable = false;
            itemCommand13.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Import = itemCommand13;
            itemCommand14.Caption = "";
            itemCommand14.Enable = false;
            itemCommand14.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Next = itemCommand14;
            itemCommand15.Caption = "";
            itemCommand15.Enable = false;
            itemCommand15.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.PageSetup = itemCommand15;
            menuButton1.PHome = false;
            itemCommand16.Caption = "";
            itemCommand16.Enable = false;
            itemCommand16.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Previous = itemCommand16;
            itemCommand17.Caption = "";
            itemCommand17.Enable = false;
            itemCommand17.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Print = itemCommand17;
            itemCommand18.Caption = "";
            itemCommand18.Enable = false;
            itemCommand18.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.PrintPreview = itemCommand18;
            menuButton1.PTool = false;
            itemCommand19.Caption = "";
            itemCommand19.Enable = false;
            itemCommand19.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Redo = itemCommand19;
            itemCommand20.Caption = "";
            itemCommand20.Enable = false;
            itemCommand20.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Refresh = itemCommand20;
            itemCommand21.Caption = "";
            itemCommand21.Enable = false;
            itemCommand21.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Save = itemCommand21;
            itemCommand22.Caption = "";
            itemCommand22.Enable = false;
            itemCommand22.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.SaveAndClose = itemCommand22;
            itemCommand23.Caption = "";
            itemCommand23.Enable = false;
            itemCommand23.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.SaveAndNew = itemCommand23;
            itemCommand24.Caption = "";
            itemCommand24.Enable = false;
            itemCommand24.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Search = itemCommand24;
            itemCommand25.Caption = "";
            itemCommand25.Enable = false;
            itemCommand25.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.SearchText = itemCommand25;
            itemCommand26.Caption = "";
            itemCommand26.Enable = false;
            itemCommand26.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Task = itemCommand26;
            itemCommand27.Caption = "";
            itemCommand27.Enable = false;
            itemCommand27.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Undo = itemCommand27;
            itemCommand28.Caption = "";
            itemCommand28.Enable = false;
            itemCommand28.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.Vaildate = itemCommand28;
            itemCommand29.Caption = "";
            itemCommand29.Enable = false;
            itemCommand29.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
            menuButton1.View = itemCommand29;
            this.ucList.RibbonBar = menuButton1;
            this.ucList.Size = new System.Drawing.Size(733, 453);
            this.ucList.Status = Common.Class.Actions.None;
            this.ucList.TabIndex = 0;
            this.ucList.Title = "";
            this.ucList.Load += new System.EventHandler(this.ucList_Load);
            // 
            // xfmAccident
            // 
            this.ClientSize = new System.Drawing.Size(733, 453);
            this.Controls.Add(this.ucList);
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "xfmAccident";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Quá Trình Công Tác";
            this.ResumeLayout(false);

        }

        private void RaiseItemSelectedEventHander(HRM_PROCESS_ACCIDENT item)
        {
            if (this.ItemSelected != null)
            {
                this.ItemSelected(this, item);
            }
        }

        private void ucList_CloseClick(object sender)
        {
            base.Close();
        }

        public bool IsSearch
        {
            set
            {
                this.ucList.IsSearch = value;
            }
        }

        public delegate void ItemSelectedEventHander(object sender, HRM_PROCESS_ACCIDENT item);

        private void ucList_Load(object sender, EventArgs e)
        {

        }
    }
}

